package com.mdc.controller;

import com.mdc.bean.Stuff;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConfigController {
	@Autowired
	private Stuff stuff;

	@Value("${hello}")
	private String hello;

	@RequestMapping("/hello1")
	public String hello1(){
		return hello;
	}

	@RequestMapping("/hello2")
	public String hello2(){
		//return new Stuff().getName();
		return stuff.getName() + ": " + stuff.getPrice();
	}
}
